The Accordion Pane Component > FAccordionPane.removeItemAt() |
FAccordionPane.removeItemAt()
Availability
Flash Player 6.
Usage
myAccordion_acp.removeItemAt (index)
Parameters
index A number specifying the index of the section that should
be removed.
Returns
Nothing
Description
Removes the item / section at the specified index. Any data associated with
the item / section will be lost. Any items above the remove index, will have
their index reduced by 1.
Example
The accordion_example1.fla example file contains an example of using this method.
The following code adds four sections to the component, removes the section at index 2, and the traces the label of the new item at index 2.
var sections = ["Section 1","Section 2","Section 3","Section 4"];
myAccordionPane_acp.setDataProvider(sections);
myAccordionPane_acp.removeItemAt(2);
var item = myAccordionPane_acp.getItemAt(2);
trace("Item Label: "+item.label); // traces "Item Label: Section 4"
See also